package com.zuxia.controller;


import com.zuxia.service.RoleMemberService;
import com.zuxia.utils.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author laoli
 * @since 2024-11-17
 */
@RestController
@RequestMapping("/user")
public class RoleMemberController {
    @Resource
    private RoleMemberService roleMemberService;

    @ApiOperation("根据用户编号查询对应角色编号")
    @GetMapping("/role/member/{id}")
    public R getRoleMemberById(@PathVariable("id") String id) throws Exception{
        return R.ok().message("角色").data("role-member", roleMemberService.getRoleId(id));
    }
}

